using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;

namespace MinCultura.Sipa.DataAccess.EntidadesArtes
{
	/// <summary>
	/// A custom serializable dataset containing 
	/// </summary>
	[Serializable()]
	[DesignerCategory("code")]


	/// <summary>Class for handling datasets</summary>  
		public class EntidadActividadData : DataTable
	{
		///
		/// Constants for table and fields mapping
		///
		public const string ART_ENTIDAD_ACTIVIDAD_TABLE = "ART_ENTIDAD_ACTIVIDAD";

		public const string ENT_ID_FIELD = "ENT_ID";
		public const string TEA_ID_FIELD = "TEA_ID";
		public const string ACE_ID_FIELD = "ACE_ID";		
		public const string ENT_AREA_ARTISTICA_FIELD = "ENT_AREA_ARTISTICA";
		public const string ENT_NRO_OBRAS_NUEVAS_FIELD = "ENT_NRO_OBRAS_NUEVAS";
		public const string ENT_SINO_FORMACION_PUBLICO_FIELD = "ENT_SINO_FORMACION_PUBLICO";
		public const string ENT_PROMEDIO_MENSUAL_PERSONAS_FIELD = "ENT_PROMEDIO_MENSUAL_PERSONAS";
		public const string ENT_SINO_NOADULTOS_FIELD = "ENT_SINO_NOADULTOS";
		public const string ENT_SINO_ETNICAS_FIELD = "ENT_SINO_ETNICAS";
		public const string ENT_SINO_DISCAPACITADOS_FIELD = "ENT_SINO_DISCAPACITADOS";
		public const string ENT_OTRA_MINORIA_ETNICA_FIELD = "ENT_OTRA_MINORIA_ETNICA";


		protected EntidadActividadData(SerializationInfo info, StreamingContext context)
		{
			//
		}

		public EntidadActividadData()
		{
			BuildDataTables();
		}

		/// <summary>
		/// Creates the following datatables: Localidades
		/// </summary>
		private void BuildDataTables()
		{
			this.TableName = ART_ENTIDAD_ACTIVIDAD_TABLE;

			Columns.Add(ENT_ID_FIELD, typeof (Decimal));
			Columns[ENT_ID_FIELD].Caption = "Id Entidad";

			Columns.Add(TEA_ID_FIELD, typeof (Decimal));
			Columns[TEA_ID_FIELD].Caption = "Id Tipo Entidad";

			Columns.Add(ACE_ID_FIELD, typeof (Decimal));			
			Columns[ACE_ID_FIELD].Caption = "Id Clase Entidad";

			Columns.Add(ENT_AREA_ARTISTICA_FIELD, typeof (Decimal));
			Columns[ENT_AREA_ARTISTICA_FIELD].Caption = "Id Area Artistica";

			Columns.Add(ENT_NRO_OBRAS_NUEVAS_FIELD, typeof (Decimal));
			Columns[ENT_NRO_OBRAS_NUEVAS_FIELD].Caption = "Num Obras Nuevas";

			Columns.Add(ENT_SINO_FORMACION_PUBLICO_FIELD, typeof (String));
			Columns[ENT_SINO_FORMACION_PUBLICO_FIELD].Caption = "Imparte Formacion Publico";

			Columns.Add(ENT_PROMEDIO_MENSUAL_PERSONAS_FIELD, typeof (String));
			Columns[ENT_PROMEDIO_MENSUAL_PERSONAS_FIELD].Caption = "Prom Mensual Presonas";

			Columns.Add(ENT_SINO_NOADULTOS_FIELD, typeof (String));
			Columns[ENT_SINO_NOADULTOS_FIELD].Caption = "Organiza Actividades por Grupos Edad";

			Columns.Add(ENT_SINO_ETNICAS_FIELD, typeof (String));
			Columns[ENT_SINO_ETNICAS_FIELD].Caption = "Organiza Actividades Minorias Etnicas";

			Columns.Add(ENT_SINO_DISCAPACITADOS_FIELD, typeof (String));
			Columns[ENT_SINO_DISCAPACITADOS_FIELD].Caption = "Organiza Actividades a Discapacitados";

			Columns.Add(ENT_OTRA_MINORIA_ETNICA_FIELD, typeof (String));
			Columns[ENT_OTRA_MINORIA_ETNICA_FIELD].Caption = "Otra Minoria Etnica";

			PrimaryKey = new DataColumn[] {Columns[EntidadActividadData.ENT_ID_FIELD]};
			TableName = ART_ENTIDAD_ACTIVIDAD_TABLE;
		}

		/// <summary>
		/// Add a new row to the table
		/// </summary>
		/// <param name="row">Dataset row
		public void addEntidadActividad(DataRow row)
		{
			this.Rows.Add(row);
		}

	}

}